using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Chimera2.Classes
{
    public class Admin
    {
        private string userName;
        [XmlAttribute("Username")]
        public string Username
        {
            get { return userName; }
            set { userName = value; }
        }

        private Guid guid;
        [XmlAttribute("GUID")]
        public Guid Guid
        {
            get { return guid; }
            set { guid = value; }
        }

        private bool active;
        [XmlAttribute("Active")]
        public bool Active
        {
            get { return active; }
            set { active = value; }
        }

        private bool canAdminHubs;
        [XmlAttribute("AdminHubs")]
        public bool CanAdminHubs
        {
            get { return canAdminHubs; }
            set { canAdminHubs = value; }
        }

        private bool canAdminBulletins;
        [XmlAttribute("AdminBulletins")]
        public bool CanAdminBulletins
        {
            get { return canAdminBulletins; }
            set { canAdminBulletins = value; }
        }

        private bool canAdminEditors;
        [XmlAttribute("AdminEditors")]
        public bool CanAdminEditors
        {
            get { return canAdminEditors; }
            set { canAdminEditors = value; }
        }

        private List<Guid> accessFrom = new List<Guid>();
        public List<Guid> AccessFrom
        {
            get { return accessFrom; }
            set { accessFrom = value; }
        }

        /// <summary>
        /// Shallow copies the Admin instance.
        /// </summary>
        public Admin Clone()
        {
            Admin a = (Admin)MemberwiseClone();

            a.Guid = System.Guid.NewGuid();
            return a;
        }
    }
}
